import replace from "rollup-plugin-replace"


const PLATFORM = process.env.SA_PLATFORM

console.log(PLATFORM,3323)

switch (PLATFORM) {
    case 'sa-weixin':
        console.log('sa-weixin',11)
        break;
    default:
        break;
}


export default {
    input: 'src/package/qq.js',
    output: {
      file: 'dist/qq/qq.full.js',
      format: 'iife',
      name: 'sa',
    },
    plugins: [
        replace({
            SA_PLATFORM: JSON.stringify(process.env.SA_PLATFORM)
            // 找到每一个 ENV ，并用 process.env.NODE_ENV 去替换
            // JSON.stringify 用来确保值是双引号的
        })
    ]
}